package com.cxd.performance.enums;


import com.cxd.performance.service.IBusinessException;

/**
 * Author: Calvin
 * Date: 2019-08-30 8:40
 * Description: Excel导入导出异常码
 */
public enum ExcelCodeEnum implements IBusinessException {

    EXCEL_DATA_NONULL("2201","导出数据不能为空"),
    EXCEL_FIELDNAME_NONULL("2202","导出对象字段不能为空"),
    EXCEL_SELECT_INDEX_NONULL("2203","导出模板列索引不能为空"),
    EXCEL_UNKNOW_VERSION("2204","未知的的Excel版本"),
    EXCEL_XLS_SHEET_OUTSIDE("2205","Excel2003单个sheet,最多不能超过65535行数据"),
    EXCEL_FIELD_UNDEFINED("2206","未定义导出字段"),
    EXCEL_HEADER_NONULL("2207","Excel表头不能为空"),
    EXCEL_HEADER_UNDEFIND("2208","未定义Excel头信息"),
    EXCEL_FILENAME_NONULL("2209","Excel文件名称不能为空"),
    EXCEL_VERSION_NOMATCH("2210","文件名称和指定的Excel版本不匹配"),
    ;

    private String code;
    private String msg;

    ExcelCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toString() {
        return "ExcelCodeEnum{code='" + this.code + '\'' + ", msg='" + this.msg + '\'' + '}';
    }
}
